import request from '@/utils/request'

export function fetchList(query) {
    return request({
        url: '/backlog/api/to/do/list/query/page',
        method: 'get',
        params: query
    })
}
export function fetchBugList(query) {
    return request({
        url: '/repair/api/repair/query/page/fault',
        method: 'get',
        params: query
    })
}
//设备
export function fetchDeviceTotal(query) {
    return request({
        url: '/device/api/statistic/runState',
        method: 'get',
        params: query
    })
}
//聚合服务
export function fetchDashBoardInfo() {
    return request({
        url: "/composition/workboard/statistic",
        method: "get",
    })
}
export function fetchMessageList() {
    return request({
        url: "/message/api/pc/dmpMessage/query/page",
        method: "get",
    })

}
//全部已读
export function readAllMessage() {
    return request({
        url: "/message/api/pc/dmpMessage/markTheMessageRead",
        method: "put",
    })

}
//全部清空
export function removeAllMessage() {
    return request({
        url: "/message/api/pc/dmpMessage/cleanUserMessage",
        method: "put",
    })

}
//删除
export function deleteMessage(id) {
    return request({
        url: `/message/api/pc/dmpMessage/deleteMsg/${id}`,
        method: "delete",
    })
}
export function hasReadInfo(params) {
    return request({
        url: `/message/api/pc/dmpMessage/read/${params.id}`,
        method: "put",
    })
}